<div id="mainLayout" fwa-layout-container="" data-main="true" class="full-height full-width">


	<div fwa-layout-box="center" class="full-height" padding="true">
	
	       <div class="full-width full-height full-overflow-y">
	       <div class="col-xs-12 background-white"> 
			<div class="row" >
                <div class="form-group col-xs-4">
                    <div class="col-xs-4 control-label text-right">
                        <span class="red"> * </span>协议编号:
                    </div>
                    <div class="col-xs-8">
                        <input type="text" class="form-control"  ng-model="agreementDetail.agreementNo" maxlength="15"  >
                    </div>
                </div>
				<div class="form-group col-xs-4">
					<div class="col-xs-4 control-label text-right">
						<span class="red"> * </span>机构名称:
					</div>
					<div class="col-xs-8">
						<select ui-select2="{allowClear:true}" class="full-width"
							ng-model="agreementDetail.idHealthcareProvider">
							<option value=""></option>
							<option ng-repeat="data in medicalOrgInfoList"
								value="{{data.medicalOrgCode}}">{{data.medicalOrgName}}</option>
						</select>
					</div>
				</div>
                <div class=" form-group col-xs-4">
                    <div class="col-xs-4 control-label text-right">
                        <span class="red"> * </span>机构类别:
                    </div>
                    <div class="col-xs-8">
                		<select ui-select2="{allowClear:false}" class="full-width"
						   ng-model="agreementDetail.organizationType">
							<option value=""></option>
							<option ng-repeat="data in communityService.medicalOrgTypeDatas"
										value="{{data.code}}">{{data.name}}</option>
						</select>
                    </div>
                </div>

	<!-- 				<div class="col-xs-8">
					<select ng-validation="{require:{msg:'协议类型必选'}}" name="agreementType" ng-model="agreementDetail.agreementType"
                    ng-init="getDataByCodeType('{codeType:\'socialInsuranceType\'}')"
                    ng-options="c.codeno as c.codename for c in dictionaryMap['socialInsuranceType']">
		                <option value="">---请选择---</option>
		            </select>
					</div> -->
			</div>
			<div class="row" style="margin-top: 10px;">
                <div class=" form-group col-xs-4">
                    <div class="col-xs-4 control-label text-right">
                        <span class="red"> * </span>协议类型:
                    </div>
                    <div class="col-xs-8">
                        <select class="form-control" name="agreementType" ng-model="agreementDetail.agreementType"
                                ng-init="getDataByCodeType('{codeType:\'socialInsuranceType\'}')"
                                ng-options="c.codeno as c.codename for c in communityService.dictionaryMap['agreementType']">
                            <option value="">---请选择---</option>
                        </select>
                    </div>
                </div>
				<div class="form-group col-xs-4">
					<div class="col-xs-4 control-label text-right">
                        <span class="red"> * </span>协议生效日期:
					</div>
					<div class="col-xs-8">
					<!--  	<input ng-validation="{require:{msg:'协议生效日期不能为空'}}" name="dateAgreementEff" date-time-picker ng-model="agreementDetail.dateAgreementEff" type="text"> -->
                        <input  ng-model="agreementDetail.dateAgreementEff"  class="form-control" fwa-datetime ng-change="inputChange()">
					</div>
				</div>
				<div class="form-group col-xs-4">
					<div class="col-xs-4 control-label text-right">
                        <span class="red"> * </span>协议终止日期:
					</div>
					<div class="col-xs-8">
					<!-- 	<input ng-validation="{require:{msg:'协议终止日期不能为空'}}" valida-model="" name="dateAgreementEnd" date-time-picker ng-model="agreementDetail.dateAgreementEnd" type="text">  -->
                        <input  ng-model="agreementDetail.dateAgreementEnd"  class="form-control" fwa-datetime ng-change="inputChange()">
					</div>
				</div>
			</div>
			
			<div class="row" style="margin-top: 10px;">
				<div class="form-group col-xs-4">
					<div class="col-xs-4 control-label text-right">
                        <span class="red"> * </span>统筹区域:
					</div>
					<div class="col-xs-8">
						 <select  class="form-control" name = "regionCode"  ng-model="agreementDetail.regionCode"
			                    ng-options="c.codeno as c.codename for c in communityService.dictionaryMap['areas']">
			                <option value="">---请选择---</option>
			            </select>
					</div>
					
					<!-- <div class="col-xs-8">
						  <select ng-validation="{require:{msg:'统筹区域必选'}}" name="regionCode" ng-model="agreementDetail.regionCode"
                    ng-init="getDataByCodeType('{codeType:\'areas\'}')"
                    ng-options="c.codeno as c.codename for c in dictionaryMap['areas']">
                <option value="">---请选择---</option>
            </select>
					</div> -->
				</div>
                <div class="form-group col-xs-8">
					<div style="width: 16%;float: left;" class="control-label text-right">
                        <span class="red"> * </span>支付方式:
					</div>
					<div style="width: 84%;float: right;padding:0px 3px 0px 5px;" >
							<input name="oldPayMentMode" ng-model="agreementDetail.oldPayMentMode" type="hidden">
				            <input name="payMentMode" ng-validation="{require:{msg:'必须选择一项'}}" ng-model="agreementDetail.payMentMode" type="hidden">
				            <span ng-repeat="paymentMode in paymentModeList" style="margin-right: 10px;">
				               <input value="{{paymentMode.codeno}}" type="checkbox"
				                       ng-click="setPaymentMode(paymentMode)"
				                       ng-checked="paymentMode.checked" > &nbsp;{{paymentMode.codename}}   &nbsp;&nbsp;&nbsp;
				            </span>
					</div>
                </div>
			</div>
			
		     <div class="form-group row">
				<div class="form-group " style="margin-top: 10px;">
					<div style="width: 11%;float: left;" class="control-label text-right">
				备注:
					</div>
				<div style="width: 89%;float: left;padding:0px 3px 0px 5px;">
							<textarea rows="3" class="form-control" ng-validation="{length:{rule:'0-100',msg:'字符不能超过100'}}" name="remarks" ng-model="agreementDetail.remarks" maxlength="130"></textarea>
					</div>
				</div>
			</div>
			</div>
			<div class="col-xs-12 background-white" style="margin-top: 8px;">
			<div class="row" >
				<div class="form-group row" style="margin-top: 10px;">
					<div class="col-xs-8">
						<div class="col-xs-2 control-label text-right">
							上传附件:
						</div>
						<div class="col-xs-10">
							<upload-input data-accepts="txt,jpg" data-files="files" >
							</upload-input>
						</div>
					</div>
					<div class="col-xs-4" >
						<button style="margin-left:-10px" type="button" class="btn btn-blue btn-sm" ng-click="uploadFile();">
							上传
						</button>
					</div>
				</div>
				
			</div>
			
			<div class="row" >
				<div style="width: 80%;float:left; margin-top: -10px;" class="control-label text-right" >
					<font color="#bbb">单个文件最大不超过2M,格式仅支持jpg、jpeg、bmp、gif、png、txt、doc、docx、xls、xlsx、ppt、pptx、pdf、csv、rar、zip、7z、cab、iso</font>
					</div>
				
			</div>
			
			 <div class="row" >
				 <div class="col-xs-12" style="padding:20px 40px;">
					 <div class="col-xs-12" style="border: 1px dashed #cccccc;">
						 <div class="form-group col-xs-3 text-center cursor-pointer"  ng-repeat="data in tableData" >
			               <div ng-mouseover="mouseover(data);" ng-mouseout="mouseout(data);" style="height:90px">
				               <div class=" col-xs-3 text-right normal-padding-top" ng-click="openLoadFile(data)">
				                	<div class="file_img"></div>
				               </div>
				               <div  class="col-xs-9 text-left"> {{data.name}} </br>文件大小:{{data.fileSize}}</br>上传时间:{{data.createDate}}</br>
				               <a  ng-show="data.show"  ng-click="downLoadFile(data)" >下载</a>
				                 <a style="margin-left: 10px;" ng-show="data.show" ng-click="deleteFile(data.id);" >删除</a>
				               </div>
			               </div>
			             </div>
					 </div>
		        </div>
			</div>
			 <div class="row">
		
				<div class="col-xs-12" style="margin-top: 20px;">
				<div class="form-group col-xs-5">
				
				</div>
				<div class="form-group col-xs-2">
					<button type="button" class="btn btn-blue btn-sm" ng-click="updateAgreement();">保存</button>
					<button type="button" class="btn btn-blue btn-sm" ng-click="goList();">取消</button>
			
				</div>
				<div class="form-group col-xs-5">
				
				</div>
				</div>
			</div>
			</div>	
			</div>
	</div>
</div>